﻿using Blazor.Diagrams.Core.Models;
using SvgPathProperties;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ERP.Workflow.Designer.BlazorUI.Models
{
    /// <summary>
    /// 流程设计器，线的属性
    /// </summary>
    public class FlowLink : LinkModel
    {
        public FlowLink(string name, NodeModel? sourceNode, NodeModel? targetNode) :
       base(name, sourceNode, targetNode)
        {
            Content = name;
            Labels.Add(new FlowLinkLabel(this, Content));
        }
        public FlowLink(string id, PortModel sourcePort, PortModel? targetPort = null)
           : base(id, sourcePort, targetPort)
        {


        }
        public FlowLink(NodeModel? sourceNode, NodeModel? targetNode)
        : base(sourceNode, targetNode)
        {
        }
        public FlowLink(PortModel? sourcePort, PortModel? targetPort = null)
           : base(sourcePort, targetPort)
        {

        }
        
        [Description("迁移名称")]
        public string? Content { get; set; }
        [Description("迁移表达式")]
        public string? Expression { get; set; }
        public string[] Paths { get; set; }
    }
}
